﻿<%@ Page Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="RC_CommandFormats.aspx.cs" Inherits="KPIS.GERP.GHRMS.APP.App_UI.Forms.RC_CommandFormats" %>

<asp:Content ID="Content1" runat="server" contentplaceholderid="ContentPlaceHolder1">  
<script type="text/javascript">
     function onTextChange(sender) 
       {
           if (sender.get_value() == "") 
        {
            sender.set_text("");
        }
      }
      function CloseActiveToolTip(supplierID) {
          var tooltip = Telerik.Web.UI.RadToolTip.getCurrent();
          if (tooltip) tooltip.hide();

          if (supplierID) {
              //Rebind the DetailTable.
              setTimeout(function() {
              __doPostBack("<%= RadGrid2.UniqueID %>", "DetailTableUpdated:" + supplierID);
              }, 100);
          }
      } 

</script>
      
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid2">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid2" 
                        LoadingPanelID="RadAjaxLoadingPanel2" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

       <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel2" runat="server">
    </telerik:RadAjaxLoadingPanel>    
    
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server">

        <Windows>
            <telerik:RadWindow 
                ID="RadWindow1"  
                Skin ="Vista"
                DestroyOnClose = "true"               
                Modal ="true"                
                VisibleStatusbar ="false"
                runat="server">
            </telerik:RadWindow>
        </Windows>

</telerik:RadWindowManager>
    
    <title>ตั้งค่ารูปแบบคำสั่ง</title>
    <link href="../../Styles/CssClass.css" rel="stylesheet" type="text/css" /> 
    
    <asp:panel ID="Panel6" runat="server" >
    <table width="1000" cellpadding="0" cellspacing="0">
        <tr>          

        <td>
        <div class="moduleDivSlim1000x450">
        <div class="moduleDivBottom1000">
        <table align="center" width ="980" >
        <tr>
            <td align="left" class="tableHeader">
                รูปแบบคำสั่ง
            </td>
        </tr>
        </table>
        <table width ="980" >
        <tr>
        <td >
        <asp:Panel ID="PanelGrid" runat="server" ScrollBars="Auto" Width = "980" Height="350" align="center" >
          <telerik:RadGrid ID="RadGrid2" runat="server" 
                AllowFilteringByColumn="True" 
                AllowAutomaticDeletes="True"
                AllowMultiRowEdit="True" 
                AllowMultiRowSelection="True" AllowPaging="True" 
                AllowSorting="True" 
                AutoGenerateColumns="False" EnableAJAX="True" 
                EnableAJAXLoadingTemplate="True" GridLines="None" 
                OnItemCommand="RadGrid2_ItemCommand" Skin="Outlook" Width="950">
                <MasterTableView AllowMultiColumnSorting="True" CellSpacing="-1" 
                    ClientDataKeyNames="cmd_type_seq" 
                    CommandItemDisplay="Top" 
                    DataKeyNames="cmd_type_seq" 
                    InsertItemPageIndexAction="ShowItemOnCurrentPage" 
                    NoMasterRecordsText="&lt; ไม่มีข้อมูล &gt;">
                    <CommandItemTemplate>
                        <table width="100%">
                            <tr>
                                <td>

                                </td>
                                <td align="right">
                                </td>
                            </tr>
                        </table>
                    </CommandItemTemplate>
                    <RowIndicatorColumn>
                           <HeaderStyle Width="20px" />
                    </RowIndicatorColumn>

                    <ExpandCollapseColumn Visible="True">
                    </ExpandCollapseColumn>

                        <Columns>
                            <telerik:GridEditCommandColumn ButtonType="ImageButton" 
                                EditText="คลิกเพื่อแก้ไขข้อมูล">
                                <HeaderStyle HorizontalAlign="Center" Width="20" />
                                <ItemStyle HorizontalAlign="Center" Width="20" />
                            </telerik:GridEditCommandColumn>                       
                       
                            <telerik:GridButtonColumn ButtonType="ImageButton" Visible = "false"
                                CommandName="Delete"                                
                                ConfirmDialogType="RadWindow" 
                                ConfirmText="ลบข้อมูลที่เลือก?" 
                                Text="คลิกเพื่อลบข้อมูล" UniqueName="column1">
                                <HeaderStyle HorizontalAlign="Center" Width="10%" />
                                <ItemStyle HorizontalAlign="Center" Width="10%" />
                            </telerik:GridButtonColumn>

                             <telerik:GridTemplateColumn AutoPostBackOnFilter="true" 
                                ShowFilterIcon="false" 
                                CurrentFilterFunction="Contains" 
                                DataField="cmd_type_name" 
                                FilterControlWidth="100%" 
                                HeaderStyle-HorizontalAlign="Center" HeaderText="ประเภทคำสั่ง" >
                                <HeaderStyle HorizontalAlign="Center" Width="200" />                                
                                <ItemTemplate>              
                                    <%# Eval("cmd_type_name_short") %> <%# Eval("cmd_type_name") %>
                                </ItemTemplate>
  
                            <HeaderStyle HorizontalAlign="Center" />
                            <ItemStyle HorizontalAlign="Left"/>
                            </telerik:GridTemplateColumn>
                         <telerik:GridBoundColumn 
                            AutoPostBackOnFilter="true" 
                            ShowFilterIcon="false" 
                            CurrentFilterFunction="Contains" 
                            DataField="rpt_header" 
                            FilterControlWidth="100%" 
                            HeaderStyle-HorizontalAlign="Center" 
                            ItemStyle-HorizontalAlign = "Left"
                            HeaderText="รูปแบบบัญชีแนบท้าย" 
                            UniqueName = "rpt_header">
                            <HeaderStyle HorizontalAlign="Center" Width="150px" />                  
                        </telerik:GridBoundColumn>    
                        <telerik:GridBoundColumn 
                            AutoPostBackOnFilter="true" 
                            ShowFilterIcon="false" 
                            CurrentFilterFunction="Contains" 
                            DataField="rpt_format" 
                            FilterControlWidth="100%" 
                            HeaderStyle-HorizontalAlign="Center"
                            ItemStyle-HorizontalAlign = "Left" 
                            HeaderText="รูปแบบคำสั่ง" 
                            UniqueName = "rpt_format">
                            <HeaderStyle HorizontalAlign="Center" />                  
                        </telerik:GridBoundColumn>    

                        </Columns>
                        <EditFormSettings EditFormType="WebUserControl"  
                            UserControlName="../UserControls/RC_CommandFormats.ascx">
                            <EditColumn UniqueName="EditCommandColumn1">
                            </EditColumn>
                        </EditFormSettings>
                        <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                    </MasterTableView>
                    <ClientSettings AllowColumnHide="True" AllowColumnsReorder="True" 
                        EnableRowHoverStyle="True" ReorderColumnsOnClient="True">
                        <Selecting AllowRowSelect="True" EnableDragToSelectRows="true" />
                    </ClientSettings>
                </telerik:RadGrid>              

            </asp:Panel>
        </td>
        </tr>
        </table>
        </div>
</div>
</td>
</tr>
</asp:panel>

</asp:Content>
